fix(verify-pypi): gh_watch multi-run and monitoring track plans 121-126#309
fix(verify-pypi): gh_watch multi-run and monitoring track plans 121-126#309th3w1zard1 wants to merge 230 commits into
Conversation
Parse solution doc Last CI check run IDs and emit defer_lfg_pr when monitoring checkpoint is unchanged (plan 059).
Covers solution-doc run ID extraction and defer_lfg_pr logic (plan 060).
Emit lfg_deferred in JSON and stderr hint when monitoring is unchanged (plan 061).
Wire --compare-checkpoint --exit-on-defer into solution doc and workflow header (plan 062).
Single flag replaces four monitoring args; tests and docs updated (plan 063).
Exit 2 when lfg_deferred so agents can stop before noop PRs (plan 064).
Compare verify head_sha to origin/master; defer only when runs active and not stale. Parse last verify link in Last CI check. Cancelled 26365458400; dispatched 26372746392 on master (plans 065-066).
Fix undefined checkpoint in human ci-status output; add canonical table fallback parser and --emit-checkpoint-snippet (plan 067).
Detect benign FC SHA lag when master-only commits are docs-only, fall back to local master ref, use dynamic dates in checkpoint snippets, and add --validate-checkpoint-doc for doc vs live gh drift.
Embed doc_validation in monitor-preflight JSON, detect status word drift vs Last CI check, prefer conclusion in snippets, and add --include-checkpoint-snippet for one-shot doc update hints.
Include created_at and queued_hours on gh runs, block defer when FC docs-only classification fails, flag doc_update_recommended on terminal runs, surface queue backlog notes, and embed checkpoint_snippet in monitor-preflight by default.
Add --apply-checkpoint-snippet to preview or write solution doc Last CI check, canonical runs table, and plan 020 line from live gh data with safe gating unless --force or doc drift recommends update.
Patch plan 020 verification table rows and plans index on apply, refresh solution doc last_verified frontmatter, and emit proceed_reason when checkpoint gate is not deferring.
Add --auto-apply-on-proceed to embed doc_apply in preflight when CI terminal proceed reasons allow, emit lfg_proceed in JSON, and refresh doc_validation after auto-write.
Map refresh_verify_dispatch and refresh_fc_dispatch to dry-run or executed gh workflow run/cancel steps in monitor preflight JSON.
Unify doc and dispatch dry-run previews and refresh monitoring docs after successful workflow dispatch when gh reports new run IDs.
One-shot refresh flag with defer guardrails and gh run polling before post-dispatch doc sync when run IDs are slow to appear.
Grant issues:write for large-file PR comments with a non-fatal fallback, and replace 40-char hex test fixtures that triggered devskim alerts.
Preview refresh actions without write or dispatch, block classify_fc_stale_gap, and embed lfg_refresh_plan in preflight JSON.
Combine monitor preflight with refresh dry-run, embed proceed_hint in JSON, and avoid early exit when dry-run refresh is blocked.
…lan 202) Derive heartbeat totals from preflight_watch_history when the status counter is unset via _max_preflight_flat_hb_total history helper.
…n 203) Move unchanged-count and max-streak helpers adjacent to _build_preflight_watch_summary for parity with plan 186-187 clustering.
… 204) Co-locate unchanged and heartbeat flat-key poll tokens in _preflight_watch_poll_flat_stderr_parts without changing stderr output.
…lan 205) Pair plan 204 poll helper with _preflight_watch_summary_flat_stderr_parts for unchanged and heartbeat tokens on watch summary stderr lines.
|
|
1 similar comment
|
|
Derive preflight watch summary flat_unchanged from history peak streak when pairwise unchanged flat-key poll count is zero, mirroring plan 202.
|
|
… 207) Extract resolve helpers for heartbeat and unchanged flat-key totals so _build_preflight_watch_summary reuses plan 202/206 fallback logic cleanly.
…208) Place poll and summary flat stderr helpers together and reuse _preflight_watch_heartbeat_interval for heartbeat_every summary tokens.
Add _preflight_max_flat_unchanged and use it when gating max_flat_unchanged tokens in preflight watch summary flat stderr output.
|
|
… 210) Add _preflight_max_flat_unchanged_for_stderr to centralize gated max_flat_unchanged summary stderr tokens when peak is below total.
|
|
Add _preflight_flat_hb_total_for_stderr to centralize gated flat_hb_total summary stderr tokens alongside the plan 210 max_flat_unchanged helper.
Add _preflight_heartbeat_every_for_stderr to emit heartbeat_every summary tokens only when unchanged flat-key polls occurred.
|
|
9 similar comments
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Summary
Continues the verify-PyPI LFG monitoring track (plans 121–126) on
local_verify_pypi_slice.py: richer defer/drift/gate-watch agent briefing, multi-rungh_watchstderr, andactive_runsin preflight watch summary JSON.Plan 126 specifically adds compact
gh_watch=verify:ID,fc:IDon defer briefing stderr when both verify and forward-commits runs are active, while keeping legacywatch=for FC-first compatibility.Test plan
python3 -m unittest discover -s Libraries/PyKotor/tests/test_utility -p 'test_local_verify_checkpoint.py'(213 tests)python3 .github/scripts/local_verify_pypi_slice.py --lfg-gate --json— confirmsgh_watch=verify:...,fc:...on live defer